home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / doc / usbmuxd / README.devel < prev    next >
Encoding:
Text File  |  2010-05-11  |  1.5 KB  |  51 lines

  1. Background
  2. ==========
  3.  
  4. 'libusbmuxd' makes it really simple to talk to a running 'usbmuxd' and
  5. hides all the details for you.  There are two function calls:
  6.  
  7. usbmuxd_scan()
  8. --------------
  9.  
  10. This returns a list of all available iPhone-like devices that are
  11. available for talking to.  The returned array contains the USB
  12. product_id, hex formatted serial_number of any iPhones/iTouches and a
  13. non-descript 'handle' for all those devices that are within range (as
  14. of March 2009, that means a device directly plugged into the
  15. computer's USB port).
  16.  
  17. Once you have found the device you want to communicate with, take its
  18. 'handle' and pass this to usbmuxd_connect().
  19.  
  20. usbmuxd_connect()
  21. -----------------
  22.  
  23. This takes a handle, a destination port number and tries to setup
  24. a proxy a connection.  It returns a file-descriptor which you should
  25. be able to read(), write() and select() on like any other active network
  26. socket connection.
  27.  
  28.  
  29. Technical details
  30. =================
  31.  
  32. When usbmuxd is running (normally started, or stopped as a result of
  33. 'udev' auto-insertion messages), it provides a socket interface in
  34. '/var/run/usbmuxd' that is designed to be compatible with the socket
  35. interface that is provided on MacOSX.
  36.  
  37. The structures for communicating over this device are documented
  38. in the 'usbmuxd-proto.h', but you shouldn't need to view them 
  39. directly if you are using the libusbmuxd.so library for easy access.
  40.  
  41.  
  42. Example
  43. =======
  44.  
  45. #include <usbmuxd.h>
  46.  
  47. ...
  48.  
  49. gcc -o leetphone leetphone.c -lusbmuxd
  50.  
  51.